package com.idenger.modules.edu.mobileWeb.banner;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.idenger.common.web.BaseController;
import com.idenger.modules.edu.entity.banner.EduBanner;
import com.idenger.modules.edu.entity.common.BaseResponseMsg;
import com.idenger.modules.edu.entity.common.ResponseMsg;
import com.idenger.modules.edu.service.banner.EduBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value = "${mobilePath}/edu/banner/eduBanner")
public class MBannerController extends BaseController {
	@Autowired
	private EduBannerService eduBannerService;
	
	@RequestMapping(value = "bannerList")
	public String bannerList(EduBanner eduBanner, HttpServletRequest request, HttpServletResponse response, Model model){
		List<EduBanner> list = eduBannerService.findList(eduBanner);
		BaseResponseMsg baseResponseMsg;
		baseResponseMsg = new BaseResponseMsg(new ResponseMsg("0", "success"));
		baseResponseMsg.addData(list);
		return renderString(response, baseResponseMsg);
	}
	
}
